import { createRequest } from '/@/api/service';
const module = 'ib/flowpath/v1/FlowpathGovCar/';
/**
 * 查询公务用车信息
 */
function GOV_CAR_LIST(
  data: FlowpathGovCar.GovCarReq,
  header: object = {},
): Promise<FlowpathGovCar.GovCarResp> {
  return createRequest(`${process.env.APP_API_URL}${module}govCarList`, data, header, 'POST');
}

/**
 * app公务用车用车码列表
 */
function GOV_CAR_CODE_LIST(
  data: FlowpathGovCar.BaseQueryReq,
  header: object = {},
): Promise<FlowpathGovCar.BaseQueryResp> {
  return createRequest(`${process.env.APP_API_URL}${module}govCarCodeList`, data, header, 'POST');
}

/**
 * 新增公务用车流程审批
 */
function ADD_GOV_CAR_APPLY(
  data: FlowpathGovCar.AddGovCarApplyReq,
  header: object = {},
): Promise<FlowpathGovCar.AddGovCarApplyResp> {
  return createRequest(`${process.env.APP_API_URL}${module}addGovCarApply`, data, header, 'POST');
}

export { GOV_CAR_LIST, GOV_CAR_CODE_LIST, ADD_GOV_CAR_APPLY };
